CLANG=clang
HIPCC=hipcc
TARGET=test

SFLAGS = -x assembler -target amdgcn-amd-amdhsa -mcode-object-version=4 -mcpu=gfx926 

all : genco genmain

genco:
	$(CLANG) $(SFLAGS) -c -o kernel_test.o kernel_test.s
	$(CLANG) -target amdgcn-amd-amdhsa kernel_test.o -o kernel_test.co

genmain:
	$(HIPCC) -o test ./demo.cpp

clean:
	rm -rf ./*.co
	rm -rf ./*.o
	rm -rf ./core.*
	rm -rf ./$(TARGET)
